package net.yxsoft.kit;

import com.jfinal.weixin.sdk.api.AccessTokenApi;
import com.jfinal.weixin.sdk.api.ApiResult;
import com.jfinal.weixin.sdk.utils.HttpUtils;

public class UniformMessageKit {

  private static String sendUniformMessageUrl = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=";

  public UniformMessageKit(){

  }

  public static ApiResult sendUniformMessage(String jsonStr) {
    System.out.println(sendUniformMessageUrl);
    String jsonResult = HttpUtils.post(sendUniformMessageUrl + AccessTokenApi.getAccessTokenStr(), jsonStr);
    return new ApiResult(jsonResult);
  }
}
